package com.boot.main.utils;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
public class ColumnListener implements ReadListener {
    private List list = new ArrayList();
    public List getList(){
        return list;
    }
    @Override
    public void invoke(Object o, AnalysisContext analysisContext){
        list.add(o);
    }
    public void doAfterAllAnalysed(AnalysisContext analysisContext){
        log.info("所有数据解析完成！");
    }
}
